package com.wyz.socket.core.base.packet.bytes;

import com.wyz.socket.core.base.packet.AbstractByteArrayReceivePacket;

import java.io.ByteArrayOutputStream;

public class BytesReceivePacket extends AbstractByteArrayReceivePacket<byte[]> {

    public BytesReceivePacket(int length) {
       super(length);
    }


    @Override
    public byte type() {
        return TYPE_MEMORY_BYTES ;
    }


    @Override
    protected byte[] build(ByteArrayOutputStream stream) {
        return stream.toByteArray() ;
    }

}
